
cc.Class({
    extends: cc.Component,

    properties: {
        labelTitle:{
            default:null,
            type:cc.Label,
        },

        labelNaga:{
            default:null,
            type:cc.Label
        },

        labelPass:{
            default:null,
            type:cc.Label
        },

        labelContent:{
            default:null,
            type:cc.Label
        },

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    // update (dt) {},

    setCbs:function (nagaCb, passCb) {
        this.nagaCb = nagaCb
        this.passCb = passCb
    },

    onDialogButtonsClicked:function (event) {
        let btnName = event.target.name
        if(btnName === "btn_confirm" && this.nagaCb){
            this.nagaCb()
        }else if(btnName === "btn_cancel" && this.passCb){
            this.passCb()
        }
    }
});
